﻿using System.Windows.Controls;
using estoque.ViewModel;

namespace estoque
{
    /// <summary>
    /// Interaction logic for TimeAccountUC.xaml
    /// </summary>
    public partial class TimeAccountUC : UserControl
    {
        private TimeAccount timeAccount = new TimeAccount();

        public TimeAccount TimeAccount
        {
            get { return timeAccount; }
            set { timeAccount = value; }
        }

        public TimeAccountUC()
        {
            InitializeComponent();
            this.DataContext = this.timeAccount;
            RepositoryVM.Center.UIStuff.PropertyChanged += this.UIStuff_PropertyChanged;
        }

        void UIStuff_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            this.expander.IsExpanded = RepositoryVM.Center.UIStuff.IsTimeAccountExpanded;
        }
    }
}